package com.net.dao;

import java.util.List;

import com.net.model.User;


public interface UserDao {
	public void save(User u);
	public void update(User user);
	public boolean delete(User u);
	public User loadUserByName(String name);
	/**
	 * 查询列表
	 * @param currentPage当前页数
	 * @param perPage每页记录数
	 * @param orderType排序方式 dec或者asc
	 * @param orderName
	 * @return
	 */
	public List<User> getUsers(final int currentPage,final int perPage,final String orderType,final String orderName);
	/**
	 * 条件查询列表
	 * @param currentPage
	 * @param perPage
	 * @param condition查询条件
	 * @return
	 */
	public List<User> getUsersByCondition(final int currentPage,final int perPage,final String condition);
	public User loadUserById(int id);
	public int getCount();
}
